You are here: Scripting Reference > Referencing Fields

Referencing Fields

The bulk of your scripts will involve referencing fields - that is using the value of a field. You will need to set the value of a destination field to the value of a source field.

A field is referenced through the See "Data Set" object. A data set object contains an array of fields which you can reference by providing their name

For example if you have a data set called INVOICE_HEADER will contains a field called INVOICENO you would reference this field using INVOICE_HEADER['INVOICENO']

Having accessed the field object you can get or set its value using one of the following properties. These different access methods handle null values differently. .Value will return a null, whereas the others will convert a null into a blank string or zero.

ClosedAccessing the value of a field with .Value
ClosedAccessing the value of a field with .AsString
ClosedAccessing the value of a field with .AsInteger
ClosedAccessing the value of a field with .AsFloat

Refer to the See "Field" class for more information on the properties of the field class